package com.lzyx;

import gnu.io.NRSerialPort;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class SerialPortPreApplication {
    public static void main(String[] args) {

        NRSerialPort.getAvailableSerialPorts()
                .forEach(log::info);

        NRSerialPort serialPort = new NRSerialPort("COM7", 9600);
        serialPort.connect();
    }

}
